package com.java.javadome.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.java.javadome.entity.TBill;
import com.java.javadome.service.TBillService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/bill")
public class BillController {

    @Resource
    private TBillService service;

    @GetMapping("/{uid}")
    public Object check(@PathVariable Integer uid){
        QueryWrapper<TBill> wrapper = new QueryWrapper<>();
        wrapper.eq("uid",uid);
        return service.list(wrapper);
    }
}
